JavaScript

A5.InksetBackground Method

Syntax

A5.Ink.setBackground(backgroundSettings)

Arguments

backgroundSettingsobject

The background settings. See A5.Ink Background Settings Object.

Description

Change the ink page background. This can be done through A5.Ink.setPage as well, but A5.Ink.setBackground allows for specific targeting of the background.

Example: Setting the Background of an Ink Control to an Image

The setBackground() method can be used to set the background of an Ink Control in the UX Component to an image. For example:

var url = "http://alphamediacapture.s3.amazonaws.com/4345.JPG";

// Get a pointer to the Ink Control Object:
var inkObj = {dialog.object}.getControl('INK1');

// define the Ink Background Properties:
var backgroundObj = {
    save: true,
    image: {
        data: url,
        size: 'cover'
    }
};

// set the Background of the 'INK1' control:
inkObj.setBackground(backgroundObj);

See Also